﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasertTemplates.Master" 
 CodeBehind="BrandHTML.aspx.cs" Inherits="WebApplication.BrandHTML" ViewStateMode="Disabled" %>

<%@ Register TagPrefix="uc1" TagName="usermeg" Src="~/UserControl/UserMessageControl.ascx" %>
<%@ Register TagPrefix="uc1" TagName="maintab" Src="~/UserControl/MainTabControl.ascx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        $(document).ready(function () {
            $("#menu1_ul1").find("li").each(function (i) {
                $(this).click(function () { $(this).children("span").toggleClass("span" + (i + 1)); });
            });

            $("#menu1_ul1").find(".li1").children("span").addClass("span1");
            $("#div_A").css("display", "block");

            //产品大分类 菜单
            $("#menu1_ul1").find("li").each(function (i) {
                $(this).click(function () {
                    $("#menu1_ul1").find("li").children("span").removeAttr("class");
                    $(this).children("span").addClass("span" + (i + 1));
                    display_productcategory($(this).children("span").attr("title"));
                });
            });

            ///各子项的 ！全选
            $.each(['A', 'B', 'C', 'D', 'E'], function (k, v) {
                $("#ContentPlaceHolder2_rp_Cate_All_cb_all_" + k).click(function () {
                    if ($(this).attr("checked") == true) {
                        $("#div_" + v).find("input").not($(this)).attr("checked", 'true');
                    }
                    else {
                        $("#div_" + v).find("input").not($(this)).attr("checked", '');

                    }
                });
            });

            ///category 勾选 subcategory会全选
            $.each(['A', 'B', 'C', 'D', 'E'], function (k, v) {
                $("#ContentPlaceHolder2_rp_Cate_All_cbl_cate_" + k + " input").click(function () {
                    var source = $(this).attr("id").toString();
                    var p = source[41];
                    var c = source[43];

                    if ($(this).attr("checked") == true) {
                        $("#ContentPlaceHolder2_rp_Cate_All_rp_cate_" + p + "_cbl_subcate_" + c + " input").attr("checked", 'true');
                    }
                    else {
                        $("#ContentPlaceHolder2_rp_Cate_All_rp_cate_" + p + "_cbl_subcate_" + c + " input").attr("checked", '');
                    }
                });

                ///category 取消勾选 时 对应的all 也取消勾选
                $.each(['A', 'B', 'C', 'D', 'E'], function (k, v) {
                    $("#ContentPlaceHolder2_rp_Cate_All_cbl_cate_" + k + " input").click(function () {
                        if ($(this) != true) {
                            $("#ContentPlaceHolder2_rp_Cate_All_cb_all_" + k).attr('checked', '');
                        }
                    });

                });

                ///subcategory 取消 勾选  时 全选也 同时去掉勾选
                $("#div_" + v).find("input").not("#ContentPlaceHolder2_rp_Cate_All_cb_all_" + k).not("#ContentPlaceHolder2_rp_Cate_All_cbl_cate_" + k + " input").click(function () {
                    var source = $(this).attr("id").toString();
                    var p = source[40];
                    var c = source[54];
                    // alert(p + c);
                    if ($(this).attr("checked") != true) {
                        $("#ContentPlaceHolder2_rp_Cate_All_cbl_cate_" + p + "_" + c + "_" + p).attr("checked", '');
                        $("#ContentPlaceHolder2_rp_Cate_All_cb_all_" + p).attr("checked", '');
                    }
                });

            });

        })

        //隐藏所有 显示特定的
        function display_productcategory(i) {
            $("#id_check_container").find(".cate_and_sub").css("display", "none");
            $("#div_" + i).css("display", "block");
        }



    </script>
<script type="text/javascript" src="Media/Js/BankScript.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
  <input type="hidden" value="t21" id="pageName" />
 <div class="content-title"><h1>Customer - Brand</h1></div> 
         <div class="con-nav"><a href="#" class="btn"><span class="ui-icon ui-icon-newwin"></span>Add New Customer</a>
               </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">

<uc1:usermeg ID="usermeg" runat="server" ></uc1:usermeg>        
    <div class="partWrap">
    <uc1:maintab ID="maintab"  runat="server"/>
    <div class="clear20"></div>
	  <ul class="uibtn">
    	<li onClick="javascript:ToggleDocument('wrapToggle')">Add Brand</li>
	</ul>
	<div class="wrapToggle" id="wrapToggle">

	<table  cellspacing="0" cellpadding="0" width="500">	
	<tr>
	<td><p class="upinput">Brand Name</p>
	<input type="text" class="input200" />
	</td>
    </tr>
   
     <tr>
	<td><p class="upinput">Brand Description</p>
	<textarea class="textarea800" cols="" rows=""></textarea>
	</td>
	</tr>
    <tr>
	<td><p class="upinput">品牌名稱</p>
	<input type="text" class="input200" />
	</td>
	</tr>
    <tr>
	<td><p class="upinput">品牌簡介</p>
	<textarea class="textarea800" cols="" rows=""></textarea>
	</td>
	</tr>
	</table>

		
	<div class="clear20"></div>
	<table width="500">
	<tr>
	 <td valign="top" ><div class="addWrap">
	  <ul class="uibtn">
    	<li onClick="javascript:ToggleDocument('smallImgList')">Add Brand Logo</li>
	</ul>
	 
	   <div class="smallImgList" id="smallImgList">	
	<table width="100%">
	<tr>
	<td  align="right"> <img class="delete closeBtn" src="Media/Css/images/del-form.png" onClick="CloseDocument('smallImgList')"></td>
	</tr>
	<tr>
	 <td><h5>Choose from Media Room</h5></td>
	</tr>
	<tr>
	<td>	
	 <div class="imgQu">
	 <ul class="slist">
	  <li></li>
	  <li></li>
	  <li></li>
	  <li></li>
	  <li></li>
	  <li></li>
	  <li></li>
	  <li></li>
	 </ul>
	 </div>
	</td>
	</tr>
	<tr>
	<td height="35"><a href="#">Upload image from your computer </a></td>
	</tr>
	<tr>
	<td height="35">
    <table  border="0" cellspacing="0" cellpadding="0" class="btnwrap">
			  <tr>
				<td  class="btnwrapl">
				 <ul class="uibtn">
    	              <li>Save</li>
	             </ul>
				</td>
				<td class="btnwrapr">
				 <ul class="uibtn">
    	           <li >Quit</li>
	              </ul>
				</td>
                <td >
                </td>				
			  </tr>
			</table>
    
    
    </td>
	</tr>
	</table>
	 </div>
	 </div></td>
	</tr>
    <tr>
      <td valign="top" width="200" >
        <div style=" margin-bottom:5px;">
          <ul class="ImgActionList">
           <li><%--<img src="Media/Css/images/del-form.png"  />--%><span class="firstletter">Delete</span>&nbsp;&nbsp;<span>Your computer upload path</span></li>

          </ul>
        </div>
      </td>
    </tr><!--edit by peter 2011-02-23 -->

	</table>		

	<ul class="ImgList">
	<li>
	<p class="p2"><img src="Media/Css/images/155_151.jpg" /></p>
    <p class="p1">file img name</p>
    <div class="p4"><span class="closeBtnbig">View</span> | <span class="closeBtnbig" onclick="closePannel('smallImgList')">Delete</span></div>
	</li>	
	</ul>
	<div  class="clear20"></div>
	<div class="productWrap">
	<div class="productTitle"></div>
	<div class="CheckWrap">
	<ul class="menu1_ul menu1" id="menu1_ul1">
	  <li class="li1">
	  <div  class="selected" >√</div>
	  <span >Textile & Garment</span></li>
	  <li class="li2"><div  class="selected" style="color:#ffffff;" >√</div>
	  <span >Electronics, AV & IT</span></li>
	  <li class="li3"><div  class="selected" style="color:#ffffff;"  >√</div>
	  <span >Houseware</span></li>
	  <li class="li4"><div  class="selected" >√</div>
	  <span >Gifts & Premium</span></li>
	  <li class="li5"><div  class="selected" >√</div>
	  <span >Others</span></li>
  </ul>
  	
	<h4  class="title20">Main Category/需要顯示中文 </h4>
    <div>
        <asp:Repeater ID="rptStart" runat="server" OnItemDataBound="rptStart_ItemDataBound">
        <ItemTemplate>
            <div id='<%#DataBinder.Eval(Container.DataItem,"startwith")%>'>
                <p><input id='ckb_start_<%#DataBinder.Eval(Container.DataItem,"startwith")%>' type="checkbox" /><label for='ckb_<%#DataBinder.Eval(Container.DataItem,"startwith")%>'>ALL</label></p>
                <ul class='cat_<%#DataBinder.Eval(Container.DataItem,"startwith")%> clsULForBrandList'>
                    <asp:Repeater ID="rptCat" runat="server">
                    <ItemTemplate>
                        <li><input id='ckb_cat_<%# Eval("ProductCatUID")%>' type="checkbox" /><label for='ckb_cat_<%# Eval("ProductCatUID")%>'><%# Eval("ProductCat_Chi")%></label></li>
                    </ItemTemplate>
                    </asp:Repeater>
                </ul>
                <div class="clear20"></div>
                <asp:Repeater ID="rptCatForSubCat" runat="server" OnItemDataBound="rptCatForSubCat_ItemDataBound">
                <ItemTemplate>
                    <p><strong><%# Eval("ProductCat_Chi")%></strong></p>
                    <ul class='ul_cat_<%# Eval("ProductCatUID")%>'>
                        <asp:Repeater ID="rptSubCat" runat="server">
                        <ItemTemplate>
                        <li><input id='ckb_subcat_<%# Eval("ProductSubCatUID")%>' type="checkbox" /><label for='ckb_subcat_<%# Eval("ProductSubCatUID")%>'><%# Eval("ProductSubCat_Chi")%></label></li>
                        </ItemTemplate>
                        </asp:Repeater>
                    </ul>
                    <div class="clear20"></div>
                </ItemTemplate>
                </asp:Repeater>
            </div>
        </ItemTemplate>
        </asp:Repeater>
        <div class="clear20"></div>
        </div>
        </div>	
<div class="clear20"></div>
<table  border="0" cellspacing="0" cellpadding="0" class="btnwrap">
			  <tr>
				<td  class="btnwrapl">
				 <ul class="uibtn">
    	              <li>
                          <asp:LinkButton ID="lkBtnSave" runat="server">Save</asp:LinkButton></li>
	             </ul>
				</td>
				<td class="btnwrapr">
				 <ul class="uibtn">
    	           <li >Quit</li>
	              </ul>
				</td>
                <td >
                </td>				
			  </tr>
              </table>
        <asp:Label ID="lblMeg" runat="server" CssClass="clsWarningMeg"></asp:Label>
            </div>
	<div class="clear20"></div>	

	
<div class="bankwrap">
	<div class="tb-wrap round">	
	<div class="tb-top round">	
	<span id="search-btn0" class="tb-slide">&nbsp;</span>
	<%--<img src="Media/Css/images/Write-form.png" class="edit" />
	<img src="Media/Css/images/del-form.png" class="delete" />--%>

   
    <span class="edit">View</span><span class="edit1"> | </span>
    <span class="delete">Delete</span><span class="delete1"> | </span> <!--edit by peter  2011-01-25-->

	</div>
	<div class="tb-cont">
	 <table width="500" border="0" cellspacing="0" cellpadding="0" class="tab-list-table">
	  <tr>
		<td width="100" class="tleft">Branch Name</td>
		<td width="2">&nbsp;</td>
		<td width="388">FLORIST DE FLORA <br/>FLORIST DE FLORA	</td>
	  </tr>
	  <tr>
		<td class="tleft">Product Category</td>
		<td>&nbsp;</td>
		<td>Art & Craft Items, Backpacks, Body Care Product, Candle Holders & Sticks, Candles/Candlesticks, Candles/Candlesticks for Christmas, Carnival Items, Ceramic/Porcelain, Christmas Decorations/Ornaments/Accessories, Christmas Lighting</td>
	  </tr>	  	 
	</table>	
	</div>
    </div>

	<div class="tb-wrap round">	
	<div class="tb-top round">	
	<span id="Span1" class="tb-slide">&nbsp;</span>
	<%--<img src="Media/Css/images/Write-form.png" class="edit" />
	<img src="Media/Css/images/del-form.png" class="delete" />--%>

    
    <span class="edit">View</span><span class="edit1"> | </span>
    <span class="delete">Delete</span><span class="delete1"> | </span><!--edit by peter 2011-02-25-->

	</div>
	<div class="tb-cont">
	 <table width="500" border="0" cellspacing="0" cellpadding="0" class="tab-list-table">
	  <tr>
		<td width="100" class="tleft">Branch Name</td>
		<td width="2">&nbsp;</td>
		<td width="388">FLORIST DE FLORA <br/>FLORIST DE FLORA	</td>
	  </tr>
	  <tr>
		<td class="tleft">Product Category</td>
		<td>&nbsp;</td>
		<td>Art & Craft Items, Backpacks, Body Care Product, Candle Holders & Sticks, Candles/Candlesticks, Candles/Candlesticks for Christmas, Carnival Items, Ceramic/Porcelain, Christmas Decorations/Ornaments/Accessories, Christmas Lighting</td>
	  </tr>	  	 
	</table>	
	</div>
    </div>		
	<div class="clear10"></div>
</div>
</div>
    <asp:HiddenField ID="hidAllowOption" Value="true" runat="server" />
    <asp:HiddenField ID="hidCustomerUID" runat="server" />
    <asp:HiddenField ID="hidBrandUID" runat="server" /> 
</asp:Content>
